Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Functions for Getting and Playing Movies


Saving Movies

The Movie Toolbox provides a set of high-level functions for storing movies within files. These files have a file type of 'MooV' and a resource type of 'moov'. Your application can gain access to existing movies with either the NewMovieFromFile function or the NewMovieFromDataFork function (described on page 2-76 and page 2-96, respectively). Once you have loaded the movie, your application uses the functions that are described in this section to save any changes you have made to the movie.

You can use the AddMovieResource function to add a new movie resource to a movie file. Your application can use this function to save a movie that it created using the functions described in "Functions for Editing Movies" beginning on page 2-226. You can use the UpdateMovieResource function to replace an existing movie resource in a movie file. You can remove a movie resource by calling the RemoveMovieResource function.

The movie resources that your application creates with the AddMovieResource and UpdateMovieResource functions may contain references to movie data. These references identify the data that constitute the movie. However, the movie data can be stored outside of the movie file. If you want to create a movie file that contains all of its movie data, use the FlattenMovie function. If you want to create a single-fork movie file, use the FlattenMovieData function.

The PutMovieIntoHandle function places a QuickTime movie into a handle. You can then convert the movie into specialized data formats.

The HasMovieChanged and ClearMovieChanged functions allow your application to work with the movie changed flag that is maintained by the Movie Toolbox. You can use this flag to determine whether a movie has been changed.

The movie changed flag indicates whether you have changed the movie. Such actions as editing the movie, adding samples to a media, or changing a data reference cause the flag to indicate that the movie has changed. There are several operations that the movie changed flag does not reflect, including changing the volume, rate, or time settings for the movie. These settings change frequently when a movie is played. Your application must monitor these settings itself.

The Movie Toolbox also supplies functions for storing and retrieving movies that are stored in the data fork of a file. These functions provide robust data reference resolution and improve low memory performance. The NewMovieFromDataFork function enables you to retrieve a movie that is stored anywhere in the data fork of a file. You can use the PutMovieIntoDataFork function to store an atom version of a specified movie in the data fork of a file.


Subtopics
HasMovieChanged
ClearMovieChanged
AddMovieResource
UpdateMovieResource
RemoveMovieResource
PutMovieIntoHandle
FlattenMovie
FlattenMovieData
NewMovieFromDataFork
PutMovieIntoDataFork

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996